<template>
	<view class="p-10">
		<view class="card">
			<u-cell-group>
				<u-cell :title="item.title" :value="options[item.prop]" v-for="(item,index) in data"></u-cell>
			</u-cell-group>
		</view>
	</view>
</template>
<script setup>
	import {
		onLoad,
	} from '@dcloudio/uni-app'
	import {
		ref
	} from 'vue'
	import {
		infoHiddenDanger
	} from '@/api/hidden-danger.js'
	let options = ref({}),
		data = ref([{
			title: '上报日期',
			prop: 'checkDate'
		}, {
			title: '上报人',
			prop: 'createBy'
		}, {
			title: '所属部门',
			prop: 'deptName'
		}, {
			title: '风险点',
			prop: 'riskLocationName'
		}, {
			title: '隐患专业',
			prop: 'specialtyName'
		}, {
			title: '隐患等级',
			prop: 'hiddenLevelName'
		}, {
			title: '责任单位',
			prop: 'dutyDeptName'
		}, {
			title: '责任人',
			prop: 'dutyUserName'
		}, {
			title: '问题描述',
			prop: 'hiddenDangerInfo'
		}, {
			title: '整改方式',
			prop: 'changeTypeName'
		}, {
			title: '整改措施',
			prop: 'changeInfo'
		}])
	onLoad((e) => {
		infoHiddenDanger({
			id: JSON.parse(e.id)
		}).then((res) => {
			options.value = res.data
		})
	})
</script>
<style>
</style>